package main

import "fmt"

type treeNode struct {
	value int
	left, right *treeNode
}

func createNode(value int) *treeNode {
	return &treeNode{value: value}
}

func (nood treeNode) noodPrint() {
	fmt.Println(nood.value)
}



func main() {
	var root treeNode
	fmt.Println(root)

	root = treeNode{value: 3}
	root.left = &treeNode{}
	root.right = &treeNode{5, nil, nil}
	root.right.left = new(treeNode)
	root.left.right = createNode(2)

	root.noodPrint()

	noods := []treeNode {
		{value: 3},
		{6, nil, &root},
		{},
	}
	fmt.Println(noods)
}